//
//  base.h
//  Dungeons and Princesses
//
//  Created by John Grange on 10/6/11.
//  Updated by Nick James, Devin Manno, Thomas Nguyen
//  Last Updated: 10/12/2011
//  Copyright (c) 2011 SD Networks. All rights reserved.
//
//  Base class for all objects in the game, please inherit this class and create the base class for your type of object, or objects,
//  then create the actual class for the individual objects: ie. base->objects->weapon, or base->room (might only need one level).
//  Lets try and make this as re-usuable as possible.
//

#ifndef Dungeons_and_Princesses_base_h
#define Dungeons_and_Princesses_base_h
#include <iostream>
#include <string>

class Base {

private:
    int objectID;          						// This should be in the form of A########## where A = the letter corsponding to your object type (W = Weapon, etc)
    std::string description;       				// This should contain the description of your object
    static int idCounter;				// used to generate objectIDs (optional). Must increment if used.
    //todo: when we save, save the current idCounter so that when we re-load the game we can restore the last idCounter used to prevent duplicate id values

public:
    // getters
    virtual std::string getClassName(){			// return the class name of the object
    	return "Base";}
    virtual int getObjectID()const{				// return the object objectID
		return objectID;}           
    virtual std::string getDesc()const{			// return the description
		return description;}

    // constructor
    Base() {idCounter = 1000, objectID = idCounter++;}				// when object is created, auto-assign a new objectID number. ObjectID

protected:
    // setters
    virtual void setObjectID(int oID) = 0;		// set the object objectID
    virtual void setDesc(std::string desc) = 0;	// set the description

};


#endif
